import java.util.ArrayList;

public class xusheng {
    public static void main(String[] args) {
        ArrayList<Student> list = new ArrayList<>();
       //创建对象
        Student one = new Student("窦文晨",18);
        Student two = new Student("小王",19);
        list.add(one);
        list.add(two);
        for (int i = 0; i < list.size(); i++) {
            Student stu = list.get(i);
            System.out.println(stu.getName() + "," + stu.getAge());


        }
    }
}
